<?php
header("Content-Type: text/html; charset=utf-8");
require_once '../smarty/Smarty.class.php';
require_once '../lib/pagination.php';
require_once '../lib/query_railway.php';
require_once '../lib/base.php';
$user=$_SESSION["RU"];

$p=($_GET["p"]==null)|($_GET["p"]==0) ?1:$_GET["p"];
$PAGE_NUM=15;
$from=($p-1)*$PAGE_NUM;
$dbtable=$tb_bl;

$str=" status='true' order by creattime desc";
$count=QR::get_total($dbtable, $str);

$data=QR::get_data($dbtable, "id,title,creattime",$str,$from,$PAGE_NUM);

$smarty = new Smarty;
$smarty->assign("user",$user);
$smarty->assign("userdata",$data);
$smarty->assign("pagination", getPageNavigation($p,$count,$PAGE_NUM));
$smarty->display("bl_all.tpl");

?>